//
//  YPContextUser_m.swift
//  YPSwift
//
//  Created by jerry on 2020/5/23.
//  Copyright © 2020 ogawa. All rights reserved.
//

import Foundation
import SwiftyJSON

public class YPContextUser_m: YPModelProtocol {
    
    internal let kuserIdKey: String = "id"
    internal let kuserUsernameKey: String = "username"
    internal let kuserPhoneKey: String = "phone"
    internal let kuserEmailKey: String = "email"
    internal let kuserTokenKey: String = "token"
    
    // MARK: 属性
    public var userid: String
    public var username: String
    public var phone: String
    public var token: String
    
    // MARK: 实现MikerSwiftJSONAble 协议， 解析json数据
    public required init?(json: JSON) {
        userid  = json[kuserIdKey].stringValue
        username  = json[kuserUsernameKey].stringValue
        phone  = json[kuserPhoneKey].stringValue
        token  = json[kuserTokenKey].stringValue
    }
    
}
